package cn.edu.experiment2;

public class Teacher {
    private String id;
    private String name;

    public Teacher(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public String getName() { return name; }

    public void openCourse(Course c) {
        c.setTeacher(this);
        System.out.println("教师 " + name + " 开课：" + c.getName());
    }
}